
**file location here** 
cd ""

set more off
clear
set seed 343342

**set style** 
set scheme plotplain

**in order of appearance in the manuscript** 

**figure 1** 

use "data_for_graph", clear 

***sort the data based on 'unvol_cont_gnipc'***
gen order = _n
sort unvol_cont_gnipc

***create a bar graph***
graph bar unvol_cont_gnipc, over(statenme, sort(1) label(angle(90) labsize(tiny))) ///
    bar(1, color(gs13)) ///
    title("") ///
    ytitle("Contribution per GNI per Capita (in US dollars)", size(small)) ///
    ylabel(0(5)35, angle(0) labsize(vsmall)) ///
    graphregion(color(white)) legend(off) ///
    aspect(0.4) 

graph export Figure_1.png, replace

**figure 2**

graph bar (mean) unvol_cont_gnipc_th, over(legacy44) asyvars title("Average Voluntary Contributions by Legacy Group")legend(label(1 "Other legacies") label(2 "Derelict decolonization")) ytitle("Average Voluntary Contributions per GNI per Capita") // good legacies vs bad legacies 

graph export Figure_2.png, replace

**table 2** 

use "csts", clear
sort ccode year 
xtset ccode year

eststo clear

eststo: xtreg ln_unvol_cont L.ln_unvol_cont legacy44 export_reliance import_reliance anticolonial priorstate loggni logpopulation ib5.colonial i.GEO_2, re 

eststo: xtgls ln_unvol_cont L.ln_unvol_cont legacy44 export_reliance import_reliance anticolonial priorstate loggni logpopulation ib5.colonial i.GEO_2, panels(heteroskedastic) corr(psar1) rhotype(dw) force

eststo: xtpcse ln_unvol_cont L.ln_unvol_cont legacy44 export_reliance import_reliance anticolonial priorstate loggni logpopulation ib5.colonial i.GEO_2, correlation(psar1) pairwise rhotype(dw) hetonly

eststo: xtreg unvol_cont_gnipc L.unvol_cont_gnipc legacy44 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, re 

eststo: xtgls unvol_cont_gnipc L.unvol_cont_gnipc legacy44 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, panels(heteroskedastic) corr(psar1) rhotype(dw) force

eststo: xtpcse unvol_cont_gnipc L.unvol_cont_gnipc legacy44 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, correlation(psar1) pairwise rhotype(dw) hetonly


esttab using "Table_2.tex", ///
 con eqlabel(none) nodep nonum label ///
 stats(N N_g, labels("Observations" "Number of States")) ///
 order (L.ln_unvol_cont L.unvol_cont_gnipc legacy44) ///
 keep (L.ln_unvol_cont L.unvol_cont_gnipc legacy44 export_reliance import_reliance anticolonial priorstate loggni logpopulation) /// 
 indicate ("Colonizer FE = 1.colonial 2.colonial 3.colonial 4.colonial 6.colonial 7.colonial 8.colonial 9.colonial" ///
 "Regional FE = 2.GEO_2 3.GEO_2 4.GEO_2 5.GEO_2") ///
 se star(* 0.10 ** 0.05 *** 0.01) mtitles("Model 1 RE" "Model 2 FGLS" "Model 3 PCSE" "Model 4 RE" "Model 5 FGLS" "Model 6 PCSE") replace
 
**table 3** 

use "csts_undp",clear

xtset ccode year 

eststo clear

eststo: xtgls UNDP_vol_cont L.UNDP_vol_cont legacy44 export_reliance import_reliance anticolonial priorstate logpop_1980 ib5.colonial i.GEO_2, panels(heteroskedastic) corr(psar1) force

eststo: xtgls ln_undp L.ln_undp legacy44 export_reliance import_reliance anticolonial priorstate logpop_1980 ib5.colonial i.GEO_2, panels(heteroskedastic) corr(psar1) force

esttab using "Table_3.tex", ///
 con eqlabel(none) nodep nonum label ///
 stats(N N_g, labels("Observations" "Number of States")) ///
 order (L.UNDP_vol_cont L.ln_undp legacy44) ///
 keep (L.UNDP_vol_cont L.ln_undp legacy44 export_reliance import_reliance anticolonial priorstate logpop_1980) /// 
 indicate ( "Colonizer FE = 1.colonial 2.colonial 3.colonial 4.colonial 6.colonial 7.colonial 8.colonial 9.colonial" ///
 "Regional FE = 2.GEO_2 3.GEO_2 4.GEO_2 5.GEO_2") ///
 se star(* 0.10 ** 0.05 *** 0.01) mtitles("Model 1 Baseline" "Model 2 Log") replace 


**supplementary information**

**table A1-1, A1-2**

use "csts", clear 

drop if unvol_cont_gnipc == . 
eststo clear
eststo: quietly estpost summarize ///
ln_unvol_cont unvol_cont_gnipc legacy44 export_reliance import_reliance anticolonial priorstate loggni logpopulation,
esttab using "Table_A1_1.tex", cells("mean sd") label nodepvar nonum mtitles("") replace

use "csts_undp", clear
eststo clear
eststo: quietly estpost summarize ///
UNDP_vol_cont ln_undp legacy44 export_reliance import_reliance anticolonial priorstate logpop_1980,
esttab using "Table_A1_2.tex", cells("mean sd") label nodepvar nonum mtitles("") replace

**table A2-1, A2-2** 

use "csts", clear 
xtset ccode year

* check for stationarity using LLC and IPS tests
xtunitroot ips unvol_cont
xtunitroot ips ln_unvol_cont 

* check for autocorrelation within panels
xtserial unvol_cont
xtserial ln_unvol_cont

**table A2-3**
use "csts", clear
xtset ccode year 

eststo clear 

eststo: xtreg unvol_cont_gnipc L.unvol_cont_gnipc cap1 coherent1 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, re 

eststo: xtgls unvol_cont_gnipc L.unvol_cont_gnipc cap1 coherent1 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, panels(heteroskedastic) corr(psar1) rhotype(dw) force

eststo: xtpcse unvol_cont_gnipc L.unvol_cont_gnipc cap1 coherent1 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, correlation(psar1) pairwise rhotype(dw) hetonly

eststo: xtreg unvol_cont_gnipc L.unvol_cont_gnipc cap1 legit1 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, re 

eststo: xtgls unvol_cont_gnipc L.unvol_cont_gnipc cap1 legit1 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, panels(heteroskedastic) corr(psar1) rhotype(dw) force

eststo: xtpcse unvol_cont_gnipc L.unvol_cont_gnipc cap1 legit1 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, correlation(psar1) pairwise rhotype(dw) hetonly


esttab using "Table_A2_3.tex", ///
 con eqlabel(none) nodep nonum label ///
 stats(N N_g, labels("Observations" "Number of States")) ///
 order (L.unvol_cont_gnipc cap1 coherent1 legit1) ///
 keep (L.unvol_cont_gnipc cap1 legit1 coherent1 export_reliance import_reliance anticolonial priorstate) /// 
 indicate ("Colonizer FE = 1.colonial 2.colonial 3.colonial 4.colonial 6.colonial 7.colonial 8.colonial 9.colonial" ///
 "Regional FE = 2.GEO_2 3.GEO_2 4.GEO_2 5.GEO_2") ///
 se star(* 0.10 ** 0.05 *** 0.01) mtitles("Model 1 RE" "Model 2 FGLS" "Model 3 PCSE" "Model 4 RE" "Model 5 FGLS" "Model 6 PCSE") replace

**table A2-4**
eststo clear

eststo: xtreg unvol_cont_gnipc L.unvol_cont_gnipc legit1 coherent1 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, re 

eststo: xtgls unvol_cont_gnipc L.unvol_cont_gnipc legit1 coherent1 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, panels(heteroskedastic) corr(psar1) rhotype(dw) force

eststo: xtpcse unvol_cont_gnipc L.unvol_cont_gnipc legit1 coherent1 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, correlation(psar1) pairwise rhotype(dw) hetonly

eststo: xtreg unvol_cont_gnipc L.unvol_cont_gnipc cap1 legit1 coherent1 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, re 

eststo: xtgls unvol_cont_gnipc L.unvol_cont_gnipc cap1 legit1 coherent1 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, panels(heteroskedastic) corr(psar1) rhotype(dw) force

eststo: xtpcse unvol_cont_gnipc L.unvol_cont_gnipc cap1 legit1 coherent1 export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, correlation(psar1) pairwise rhotype(dw) hetonly

esttab using "Table_A2_4.tex", ///
 con eqlabel(none) nodep nonum label ///
 stats(N N_g, labels("Observations" "Number of States")) ///
 order (L.unvol_cont_gnipc cap1 coherent1 legit1) ///
 keep (L.unvol_cont_gnipc cap1 legit1 coherent1 export_reliance import_reliance anticolonial priorstate) /// 
 indicate ("Colonizer FE = 1.colonial 2.colonial 3.colonial 4.colonial 6.colonial 7.colonial 8.colonial 9.colonial" ///
 "Regional FE = 2.GEO_2 3.GEO_2 4.GEO_2 5.GEO_2") ///
 se star(* 0.10 ** 0.05 *** 0.01) mtitles("Model 1 RE" "Model 2 FGLS" "Model 3 PCSE" "Model 4 RE" "Model 5 FGLS" "Model 6 PCSE") replace
 
**table A2-5**
eststo clear

eststo: xtreg ln_unvol_cont L.ln_unvol_cont legacy44 export_reliance import_reliance anticolonial priorstate conflict_expanded staffnumber unfounding loggni logpopulation ib5.colonial i.GEO_2, re 

eststo: xtgls ln_unvol_cont L.ln_unvol_cont legacy44 export_reliance import_reliance anticolonial priorstate conflict_expanded staffnumber unfounding loggni logpopulation ib5.colonial i.GEO_2, panels(heteroskedastic) corr(psar1) rhotype(dw) force

eststo: xtpcse ln_unvol_cont L.ln_unvol_cont legacy44 export_reliance import_reliance anticolonial priorstate conflict_expanded staffnumber unfounding loggni logpopulation ib5.colonial i.GEO_2, correlation(psar1) pairwise rhotype(dw) hetonly

eststo: xtreg unvol_cont_gnipc L.unvol_cont_gnipc legacy44 export_reliance import_reliance anticolonial priorstate conflict_expanded staffnumber unfounding ib5.colonial i.GEO_2, re 

eststo: xtgls unvol_cont_gnipc L.unvol_cont_gnipc legacy44 export_reliance import_reliance anticolonial priorstate conflict_expanded staffnumber unfounding ib5.colonial i.GEO_2, panels(heteroskedastic) corr(psar1) rhotype(dw) force

eststo: xtpcse unvol_cont_gnipc L.unvol_cont_gnipc legacy44 export_reliance import_reliance anticolonial priorstate conflict_expanded staffnumber unfounding ib5.colonial i.GEO_2, correlation(psar1) pairwise rhotype(dw) hetonly

esttab using "Table_A2_5.tex", ///
 con eqlabel(none) nodep nonum label ///
 stats(N N_g, labels("Observations" "Number of States")) ///
 order (L.ln_unvol_cont L.unvol_cont_gnipc legacy44) ///
 keep (L.ln_unvol_cont L.unvol_cont_gnipc legacy44 export_reliance import_reliance anticolonial priorstate  conflict_expanded staffnumber unfounding loggni logpopulation) /// 
 indicate ("Colonizer FE = 1.colonial 2.colonial 3.colonial 4.colonial 6.colonial 7.colonial 8.colonial 9.colonial" ///
 "Regional FE = 2.GEO_2 3.GEO_2 4.GEO_2 5.GEO_2") ///
 se star(* 0.10 ** 0.05 *** 0.01) mtitles("Model 1 RE" "Model 2 FGLS" "Model 3 PCSE" "Model 4 RE" "Model 5 FGLS" "Model 6 PCSE") replace

**table A2-6**
eststo clear

eststo: xtreg ln_unvol_cont L.ln_unvol_cont legacy export_reliance import_reliance anticolonial priorstate loggni logpopulation ib5.colonial i.GEO_2, re 

eststo: xtgls ln_unvol_cont L.ln_unvol_cont legacy export_reliance import_reliance anticolonial priorstate loggni logpopulation ib5.colonial i.GEO_2, panels(heteroskedastic) corr(psar1) rhotype(dw) force

eststo: xtpcse ln_unvol_cont L.ln_unvol_cont legacy export_reliance import_reliance anticolonial priorstate loggni logpopulation ib5.colonial i.GEO_2, correlation(psar1) pairwise rhotype(dw) hetonly

eststo: xtreg unvol_cont_gnipc L.unvol_cont_gnipc legacy export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, re 

eststo: xtgls unvol_cont_gnipc L.unvol_cont_gnipc legacy export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, panels(heteroskedastic) corr(psar1) rhotype(dw) force

eststo: xtpcse unvol_cont_gnipc L.unvol_cont_gnipc legacy export_reliance import_reliance anticolonial priorstate ib5.colonial i.GEO_2, correlation(psar1) pairwise rhotype(dw) hetonly

esttab using "Table_A2_6.tex", ///
 con eqlabel(none) nodep nonum label ///
 stats(N N_g, labels("Observations" "Number of States")) ///
 order (L.ln_unvol_cont L.unvol_cont_gnipc legacy) ///
 keep (L.ln_unvol_cont L.unvol_cont_gnipc legacy export_reliance import_reliance anticolonial priorstate loggni logpopulation) /// 
 indicate ("Colonizer FE = 1.colonial 2.colonial 3.colonial 4.colonial 6.colonial 7.colonial 8.colonial 9.colonial" ///
 "Regional FE = 2.GEO_2 3.GEO_2 4.GEO_2 5.GEO_2") ///
 se star(* 0.10 ** 0.05 *** 0.01) mtitles("Model 1 RE" "Model 2 FGLS" "Model 3 PCSE" "Model 4 RE" "Model 5 FGLS" "Model 6 PCSE") replace
 
